home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Information
/
THINK C Digest
/
1991
/
91-05
< prev
next >
Wrap
Text File
|
1995-12-31
|
41KB
|
1,247 lines
Path: ucivax!gateway
From: fleabag@athena.mit.edu
Subject: TCL & editTexts
Message-ID: <9105050615.AA29440@e40-008-6.MIT.EDU>
Newsgroups: fa.think-c
Lines: 32
Date: 5 May 91 06:16:11 GMT
hi,
here's a TCL question from someone who's just learning
its metaphor:
i'd like to mimic an effect from Performer. To change
the name of a track (from within a scrolling list of
tracks), you option-click on the name. the static
text field then becomes an edit-text field. so far,
so good.
here's the hitch: the edit-text works kind of modally.
that is, while you're editing, if you click anywhere
other than in the edit-text, or if you hit return,
enter, or tab, the edit-text reverts to a static-text
with the new name.
so how can i create this effect, using the combination
of edit-text and undo-able task?
i'm not sure if this will help, but the static text is
not really a CStaticText, it's just a member of a CList
maintained within a CScrollPane.
a thousand thanks (in advance, bien sur!)
:jeff bellsey
fleabag@athena.mit.edu
Path: ucivax!gateway
From: dmac@eagle.mit.edu ("David S. McCormick")
Subject: Inside Mac 6 available
Message-ID: <9105051525.AA01156@eagle.mit.edu>
Newsgroups: fa.think-c
Lines: 20
Date: 5 May 91 15:25:32 GMT
For those who don't own ETO or are not beta testers or big time
developers, Inside Mac 6 has hit at least one bookstand. If you are
burning to get your 2-1/2" copy (size of IM 1-3 combined), and your
local outlet doesn't yet have it, you can get it from:
Quantum Books
One Kendall Square
Cambridge, MA 02139
617-494-5042 (voice)
617-577-7282 (fax)
They'll ship anywhere.
Just thought aquiring minds might want to know.
Cheers,
David S. McCormick
MIT-EAPS Geology
dmac@athena.mit.edu
dmac@eagle.mit.edu
Path: ucivax!gateway
From: jerome@ee.fit.edu (Jerome Chan Yeow Heong - 57875)
Subject: Programming TCL
Message-ID: <9105051029.AA01919@ee.fit.edu>
Newsgroups: fa.think-c
Lines: 16
Date: 5 May 91 19:48:53 GMT
I'm very new to TCL and OOP so please bear with these questions.
How do I put a PICT resource on the screen?
I've tried using the IViewRes() function of CPicture but nothing
really happens. Can someone give me a few lines of code to
demonstrate how this should be done?
Should my CPicture object's supervisor be gDesktop or should I
put it into a CWindow object?
There should be examples!( tons of them! ) in the Think C Manual!
.Chaos
Path: ucivax!gateway
From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
Subject: Re: TCL & editTexts
Message-ID: <7734.9105061022@lfcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 18
Date: 6 May 91 10:31:55 GMT
>i'd like to mimic an effect from Performer.
Interesting! I wanted to do exactly the same, and did so. I did the
following:
Create a PopUp class as a director sub-class which disposes of itself when
it becomes deactivated. Put an edit-text pane into it. That way, you can
create one when you option-click, and when you click elsewhere (on another
window) the pop-up window gets deactivated and promptly goes away. You can
inherit and alter the dispose method or whatever to get the correct
cleaning-up operation.
One problem - you can still command-drag the underlying window. This is
embarassing, but no more. I haven't thought of an easy clean fix for this
yet.
Nick.
Path: ucivax!gateway
From: ehorvath@attmail.com
Subject: When the gopher isn't the gopher any more...
Original-From: attmail!ehorvath (Ned Horvath )
Lines: 30
Date: 9 May 91 19:08:38 GMT
Phone: +1 908 671 7100
Message-ID: <9105091208.aa16046@ics.uci.edu>
>To: internet!ics.uci.edu!think-c
Content-Type: text
Content-Length: 1318
Newsgroups: fa.think-c
Message-Version: 2
EMail-Version: 2
UA-Message-ID: <MAC-1.3.4A1-618034-ehorvath-408>
UA-Content-ID: <MAC-1.3.4A1-618034-ehorvath-408>
MTS-Message-ID: <ehorvath1291904020>
>i'd like to mimic an effect from Performer.
Nick Rothwell remarks:
>I did the following:
>Create a PopUp class as a director sub-class which disposes of itself when
>it becomes deactivated. Put an edit-text pane into it. That way, you can
>create one when you option-click, and when you click elsewhere (on another
>window) the pop-up window gets deactivated and promptly goes away. You can
>inherit and alter the dispose method or whatever to get the correct
>cleaning-up operation.
>One problem - you can still command-drag the underlying window. This is
>embarassing, but no more. I haven't thought of an easy clean fix for this
>yet.
I've had analogous problems; the root problem appears to be that while a
mouseClick or other event can be used to set a new gGopher, there is nothing
in the TCL analogous to the window Deactivate event, some notification to the
current gGopher that it is losing the "sceptre." Adding this notion is
non-trivial, though: you really want to notify the gGopher and, recursively,
itsEnclosure, back up to (but not including) the lowest common visual ancestor
with the NEW gGopher. But the gGopher is guaranteed only to be a CBureaucrat;
it may not be a CPane, in which case it doesn't need notification (or does
it?)
Yep, I'm confused too.
=Ned Horvath=
ehorvath@attmail.com
Path: ucivax!gateway
From: cfejm@ux1.cts.eiu.edu (John Miller)
Subject: Sound Manager help, please...
Message-ID: <9105092148.AA16653@ux1.cts.eiu.edu>
X-Mailer: ELM [version 2.3 PL0]
Newsgroups: fa.think-c
Lines: 21
Date: 9 May 91 21:47:53 GMT
Would someone be willing to post or to e-mail me some basic
sample code which demonstrates how to use a sampled sound
to play different notes?
The Sound Manager documentation unfortunately provides no clear
examples, and the Sample Code notes I've looked at seem to be
extremely long, obtuse, and more directed to "why you should program
with MacApp" than a simple, clear, direct way to use the Sound manager.
Any help or where-to-look advice would be greatly appreciated.
Thanks,
John
John Miller
Music Theory
Eastern Illinois University
Path: ucivax!gateway
From: nagel@ics.uci.edu (Mark Nagel)
Subject: ARCHIVE: Pretty C 1.43 & Floating Windows
Message-ID: <29000.673836800@ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: think-c-request@ics.uci.edu
Organization: University of California, Irvine - Dept of ICS
Lines: 51
Date: 10 May 91 00:53:27 GMT
Phone: (714) 856-5039
[NOTE: I've modified the layout of the archive area slightly.
All files from Symantec are now stored in think-c/symantec.
Other (3rd party) compiler enhancements are still in
think-c/compiler. I will be adding the 4.05 updater as soon
as I receive an uncorrupted version from Rich. Some mailer
ate the one he sent me a few days ago. -- Mark]
/*****************************************************************************/
From: jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
Subject: Pretty C 1.43 (part 1 of 4)
Date: Tue, 7 May 91 13:01:27 GMT
[Pretty C 1.43 - part 1 of 4]
Here is version 1.43 of PrettyC, a utility for C programmers. PrettyC
prints C source code and makes it look nice, avoiding splitting
functions across pages where possible, printing comments and code in
different, selectable fonts and sizes, emboldening and/or italicizing
keywords and comments, etc. It accepts multiple source files as
input and prints an index at the end of the listing: the index gives
function, files, page number and type. An option to print just the
index is available. A PreScan option scans the selected files and
lets the user select as many files and/or functions as s/he wishes
for printing.
Changes from v1.04: several bug fixes. Added user-specified margins,
load & save sets of parameters. Better pagination, improved font size
handling, support for THINK C classes & methods, etc, etc.
Also included is an INIT called Pretty thoughts which makes THINK C
call PrettyC when its Print... command is chosen from the File menu.
Shareware.
Jeremy Roussak (jeremyr@dcs.qmw.ac.uk)
[Saved as: /mac/think-c/compiler/prettyc-143.hqx; 184K]
/*****************************************************************************/
Date: Tue, 16 Apr 91 08:26:32 -0400
From: spencer@cgrg.ohio-state.edu (Stephen N. Spencer)
Subject: Floating Windows Code!
This self-extracting Compactor archive contains a THINK C v4.0
project which implements floating windows. It was written by
Patrick Doane and downloaded from GEnie. The author's address
on GEnie is R.DOANE. Enjoy.
[Saved as: /mac/think-c/code/floating-windows.hqx; 37K]
Path: ucivax!gateway
From: nick@lfcs.edinburgh.ac.uk (Nick Rothwell)
Subject: Re: When the gopher isn't the gopher any more...
Message-ID: <24813.9105101104@lfcs.ed.ac.uk>
Newsgroups: fa.think-c
Lines: 18
Date: 10 May 91 11:31:14 GMT
>>One problem - you can still command-drag the underlying window. This is
>>embarassing, but no more. I haven't thought of an easy clean fix for this
>>yet.
>
>I've had analogous problems; the root problem appears to be that while a
>mouseClick or other event can be used to set a new gGopher, there is
nothing
>in the TCL analogous to the window Deactivate event,
The command/drag problem is different, I think. I may be wrong, but
command-drag on a lower window's title bar doesn't change the window order
and I'm not even sure the click event gets as far as the application. My
popup windows are sitting above the main window, and if the main window is
command-dragged to another location the pop-ups don't find out about it and
are left behind.
Nick.
Path: ucivax!gateway
From: nagel@ics.uci.edu (Mark Nagel)
Subject: ARCHIVE: THINK C 4.05 Updater
Message-ID: <5057.673893705@ics.uci.edu>
Newsgroups: fa.think-c
Reply-To: think-c-request@ics.uci.edu
Organization: University of California, Irvine - Dept of ICS
Lines: 85
Date: 10 May 91 16:41:53 GMT
Phone: (714) 856-5039
Date: Mon, 06 May 91 15:44:05 EDT
From: Rich Siegel <siegel@world.std.COM>
Subject: THINK C 4.0.5 Updater
THINK C 4.0.5 ONLINE UPDATE
============================
Copyright ) 1990 Symantec Corporation. All rights reserved.
4/4/91
INTRODUCTION
============
This update package updates and fixes several parts of THINK C 4.0.
It is identical to the THINK C 4.0.2 update released in April of 1990.
The main difference are:
% THINK C 4.0.5 is 90% compatible with System 7.0
% A minor documentation bug has been corrected
If you've already applied the updates from 4.0.2, you'll only need to
use the THINK C 4.0.5 update.
While it is a good idea to apply all the updates, you can apply only
the ones that affect the way you work with THINK C. For instance, if
you don't use the THINK Class Library, you don't need to apply the
TCL updates.
Each of the updates is in its own folder. The list below describes
what each update is for and who should update.
WHAT'S IN THE UPDATE PACKAGE?
=============================
The update package is made up of six folders. Each folder contains
a documentation file that tells you how to apply the update. The
documentation file also describes in more detail what the update
is for.
THINK C 4.0.5 Update (NEW FOR 4.0.5)
------------------------------------
% All THINK C users should update.
This update transforms your existing THINK C 4.0 application
to THINK C 4.0.5. This update includes all the fixes from THINK C
4.0.2 and lets THINK C run with System 7.0. This update includes
a new version of the THINK C Debugger.
NOTE: THINK C 4.0.5 is 90% compatible
with System 7.0. It will NOT work
with Virtual Memory or in 32-bit mode.
Documentation Update (NEW FOR 4.0.5)
--------------------
% All THINK C users should read this update.
This document describes some errors, typos, and omissions from
the THINK C 4.0 documentation.
Color.h Update
--------------
% All THINK C users should update.
This update contains a replacement Color.h file.
TCL Update
----------
% All TCL users should update.
This update fixes some bugs in the THINK Class Library.
TCL Demo Update
---------------
% Users learning the TCL should update.
This update fixes some bugs in the example programs for the TCL.
scanf Update
------------
% All users who use the ANSI libraries and have not updated
already should update
This update fixes bugs in scanf() and related functions in the
ANSI library. This update is identical to the scanf() update of
October 1989.
[Saved as: /mac/think-c/symantec/405-updater.hqx; 192K]
Path: ucivax!gateway
From: eyiskis@polyslo.calpoly.edu (Eric Yiskis)
Subject: Re: 32 Bit QuickDraw header file for Think C
Message-ID: <9105110048.AA11380@polyslo.CalPoly.EDU>
Newsgroups: fa.think-c
Lines: 6
Date: 11 May 91 00:49:11 GMT
Great, now I have the header file!
But, what do these routines do? Where do I find the documentation?...
Thanks,
Eric.
Path: ucivax!gateway
From: jp48+@andrew.cmu.edu (Jonathan Pace)
Subject: Please help me allocate memory
Message-ID: <sc_syUS00WB9ECpENw@andrew.cmu.edu>
Newsgroups: fa.think-c
Lines: 18
Date: 11 May 91 06:37:55 GMT
I'm working with a pointer to several arrays of type long. The pointer is
used as a global. I can't figure out when and where to declare the sizes of
the various arrays. I have a structure as follows
instance {
long *x;
long *y;
long *id;
} ;
and I know I want to declare the size of the x, y, and id arrays to be MAX_SIZE
which I declare as a macro. Can someone please tell me how I should indicate
to my program the size of these arrays. I'm getting desperate.
Jon
p.s. - please speak in simple terms, I don't have much experience programming
the Mac in Think C.
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: 32 Bit QuickDraw header file for Think C
Message-ID: <9105111552.AA13883@chaos.cs.brandeis.edu>
In-Reply-To: Eric Yiskis's message of 11 May 91 00:49:11 GMT <9105110048.AA11380@polyslo.CalPoly.EDU>
Newsgroups: fa.think-c
Lines: 21
Date: 11 May 91 15:52:33 GMT
Eric wrote:
Great, now I have the header file!
But, what do these routines do? Where do I find the documentation?
The 32 Bit QuickDraw routines are documented in a seperate document
from Apple, that comes with the 32 Bit QuickDraw developer's kit,
which you can get from APDA (unless they don't sell it anymore).
The 32 Bit QuickDraw routines are now in the System 7 software
release, and the best reference for these routines is in Inside Mac
VI. For the most part, the routines in the 32 Bit QuickDraw package
are in the Graphic Devices Manager chapter.
-phil
----
Phil Shapiro Technical Support Analyst
Language Products Group Symantec Corporation
Internet: phils@chaos.cs.brandeis.edu
Path: ucivax!gateway
From: jim@fpr.com ("James E. O'Dell")
Subject: 68881 Exception Vector
Message-ID: <9105140110.AA11760@uu.psi.com>
Newsgroups: fa.think-c
Reply-To: "James E. O'Dell" <jim@fpr.com>
Organization: Fort Pond Research
Lines: 15
Date: 14 May 91 01:12:46 GMT
Does anyoen know how to set the 68881 (Floating point processor)
exception vector from THINK C? I recently picked up some assembly
code that does the trick but was hoping that I could write it in C
so that 6 months from now I'll have some idea as to how it works.
I can successfully set the SANE halt vector when running in non-68881
mode using SetHaltVector but the SAME routine SetTrapVector described
in the Apple Numerics Manual doesn't seem to be implemented.
Thanks in advance,
Jim O'Dell
jim@fpr.com
Path: ucivax!gateway
From: kaye@grad1.cis.upenn.edu (Jonathan Kaye)
Subject: Getting on mailing list
Message-ID: <9105141443.AA13641@gradient.cis.upenn.edu>
Posted-Date: Tue, 14 May 91 10:43:50 EDT
Newsgroups: fa.think-c
Lines: 12
Date: 14 May 91 14:44:13 GMT
Hi!
I'm a recent convert to Think C (well, if pressed, I really didn't
convert from anything). I was told that by writing to this address,
I would receive the latest information about Think C. Please put my
name on the mailing list (Jonathan Kaye -
kaye@gradient.cis.upenn.edu).
Thanks!
Jonathan
Newsgroups: fa.think-c
Path: ucivax!orion.oac.uci.edu!eabu111
From: eabu111@orion.oac.uci.edu (Steven Luh)
Subject: Mailing List
Message-ID: <283034C3.6745@orion.oac.uci.edu>
Organization: University of California, Irvine
Date: Tue, 14 May 1991 19:04:34 GMT
Lines: 5
I'm also interesting in getting on the mailing list. Can some post of e-mail
me with the details?
Steve
Path: ucivax!gateway
From: jbr@cblph.att.com
Subject: Problem With CEditText Class
Message-ID: <9105141603.aa01388@ics.uci.edu>
Newsgroups: fa.think-c
Original-From: cblph!jbr (j.a.brownlee)
Lines: 31
Date: 14 May 91 23:04:03 GMT
I am having yet another problem with the TCL, no doubt due once again to my
lack of understanding. My configuration is a IIcx, TC 4.0.2, and System 6.0.3.
I have a window in which I am creating several control objects, such as
buttons, static text, scroll bars, etc. They all seem to work fine. However,
when I try to create a CEditText object, I have problems. I am trying to do
something similar to the Edit Text boxes in a standard dialog.
When the object is created, the text I have initially placed in the box is
displayed correctly at the expected location. If I click in the object's pane,
an I-beam cursor is displayed at the correct location. I can also drag over
all or part of the text and it is highlighted correctly. However, any keys I
type (including Backspace) have no apparent effect, nor does the cursor blink
as described in the manual. When I dispose of the object, my machine locks up.
Using the exact same sequence of calls on a CStaticText object works fine,
including the Dispose().
The manual mentions that one must take care to have the object's Supervisor
handle its commands. I am checking for that, but I am not getting any commands
from the object (the supervisor is the related CDocument). The manual also
says that the default methods handle typing, blinking the cursor, etc., but
those things don't work for me. I tried invoking the Activate() method on the
object, but that had no effect.
Obviously, I am doing something wrong somewhere. Does anyone have any ideas
as to what? Thanks in advance for any pointers (uh, Handles?) or advice.
^ _ Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
/_\ @ / ` 471 E Broad St, Suite 1610, Columbus, Ohio 43215 (614) 860-7461
/ \ | \_, E-mail: jbr@cblph.att.com Who pays attention to what _I_ say?
"Scotty, we need warp drive in 3 minutes or we're all dead!" --- James T. Kirk
Path: ucivax!gateway
From: jim@fpr.com ("James E. O'Dell")
Subject: Bug in math.c
Message-ID: <9105151203.AA19788@uu.psi.com>
Newsgroups: fa.think-c
Reply-To: "James E. O'Dell" <jim@fpr.com>
Organization: Fort Pond Research
Lines: 22
Date: 15 May 91 12:06:12 GMT
In the ANSI file math.c there is a macro called RangeCheck
which I think is used inappropriately in the exp function. The
result is that exp(-100000000.0) is INF and not 0.0.
RangeCheck checks all of the FP exception flags and
if any are set it sets the result to INF. The problem is
that, at least for exp, if there is a floating point underflow
the result of the calculation should be zero.
Another thing that I've noticed about the math.c file is that the routines
in it always manage to call the FPROCENTRY routine but never call
the corresponding FPROCEXIT routine. Has anyone else noticed this?
Does anyone out there have a comlete compilation of
the known math errors in ANSI library? Rich?
Thanks,
Jim O'Dell
jim@fpr.com
Path: ucivax!gateway
From: well!crunch@apple.com (John Draper)
Subject: Getting update to Think C for Sys 7.0
Message-ID: <9105182251.AA15583@well.sf.ca.us>
Newsgroups: fa.think-c
Lines: 23
Date: 18 May 91 23:14:18 GMT
What is the procedure for getting an update to Think C that
allows one to use it with System 7.0.
I don't know if this is the right forum to ask this, but I'll
ask anyway, buit is it possible for me to have one hard drive
with Sys 6.0.4, and another one with Sys 7.0, and not have
to re-build the desktop of the sys 6.0.4 each time I want to
have both drives on-line for copying files and such.
As it stands now, everytime I start a sys 7.0 as startup,
and when the sys 6 comes on line, it NUKES my desktop file
each time.
It would seem to me that Apple would provide an easier,
less hassle way of switching so it makes it easier to transfer
to sys 7.0 by perhaps changing the sys 7.0 desktop file to
a different name.
Unfortunately, while at the developers conf last week, nobody
at Apple knew how to do it easier.
John D.
Path: ucivax!gateway
From: jfk@eniac.seas.upenn.edu ("James F. Kennedy")
Subject: Question about 4.0.5 and 4.0.4....
Message-ID: <9105191438.AA08472@ignatz.seas.upenn.edu>
X-Mailer: ELM [version 2.3 PL0]
Posted-Date: Sun, 19 May 91 10:38:28 EDT
Newsgroups: fa.think-c
Lines: 17
Date: 19 May 91 14:39:00 GMT
Hello all,
Quick question. I just noticed that the updater for Think C to version
4.0.5 has been posted. Does this update supercede the 4.0.4 update contained
on the System 7 Beta 4 dist? It seems to me that 4.0.4 install some
new libraries while 4.0.5 doesn't (ie, 4.0.4 was supposedly more MPW
interface compatible)...which is right? Any help would be appreciated.
Also, when will the new version of Think C (that is 100% compatible with
system 7.0) be released?
James
--
James F. Kennedy Unversity of Pennsylvania
(215)387-3624 jfk@seas.upenn.edu
"Wowzers!" ST0809@applelink.apple.com
Path: ucivax!gateway
From: wnn@ornl.gov (Wolfgang Naegeli)
Subject: Re: Getting update to Think
Message-ID: <9105200621.aa16154@ics.uci.edu>
Newsgroups: fa.think-c
Lines: 23
Date: 20 May 91 13:22:01 GMT
Reply to: RE>Getting update to Think C f
John Draper asks:
> is it possible for me to have one hard drive
> with Sys 6.0.4, and another one with Sys 7.0, and not have
> to re-build the desktop of the sys 6.0.4 each time I want to
> have both drives on-line for copying files and such.
> As it stands now, everytime I start a sys 7.0 as startup,
> and when the sys 6 comes on line, it NUKES my desktop file
> each time.
Install the Desktop Mgr INIT from the AppleShare package on your 6.0.4 drive.
That should solve your problem. It does for me with 6.0.7 and 7.0,
I have not tested such a setup with 6.0.4, but I see now reason why it
should behave differently.
Wolfgang N. Naegeli
University of Tennessee & Oak Ridge National Laboratory
Internet: wnn@ornl.gov Bitnet: wnn@ornlstc
Phone: 615-574-6143 Fax: 615-574-6141 (OrchidFax)
QuickMail (QM-QM): Wolfgang Naegeli @ 615-574-4510
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: Question about 4.0.5 and 4.0.4....
Message-ID: <9105201353.AA02410@chaos.cs.brandeis.edu>
In-Reply-To: "James F. Kennedy"'s message of 19 May 91 14:39:00 GMT <9105191438.AA08472@ignatz.seas.upenn.edu>
Newsgroups: fa.think-c
Lines: 28
Date: 20 May 91 13:54:05 GMT
From "James F. Kennedy" <jfk@eniac.seas.upenn.edu>:
Quick question. I just noticed that the updater for Think C to
version 4.0.5 has been posted. Does this update supercede the
4.0.4 update contained on the System 7 Beta 4 dist? It seems to me
that 4.0.4 install some new libraries while 4.0.5 doesn't (ie,
4.0.4 was supposedly more MPW interface compatible)...which is
right? Any help would be appreciated.
The 4.0.5 update does supercede the 4.0.4 update. The main difference
is that the 4.0.5 update contains a patch to the "Precompile" command,
which allows users to generate precompiled headers that don't contain
type information for pointer parameters (it converts them to "void
*"). For more info, see the ReadMe file for the 4.0.5 Think C patch.
An updated version of the System 7 headers for v4.0.5 of Think C can
be found on Apple's System 7 Final CD-ROM. These headers are, for the
most part, compatible with the MPW C headers.
Also, when will the new version of Think C (that is 100% compatible
with system 7.0) be released?
No release date has been announced yet.
-phil
----
Phil Shapiro Technical Support Analyst
Language Products Group Symantec Corporation
Internet: phils@chaos.cs.brandeis.edu
Path: ucivax!gateway
From: mcmac@hubcap.clemson.edu (Scott McAlister)
Subject: 4.0.5 Debugger crashes under 7.0
Message-ID: <9105201553.AA07614@hubcap.clemson.edu>
X-Mailer: Elm [version 2.1 PL1]
Newsgroups: fa.think-c
Lines: 15
Date: 20 May 91 15:54:23 GMT
I am trying to use the 4.0.5 debugger under sys 7.0 and it locks up my
IIsi when I "Run" my program. In the status panel of the source window
the message "illegal instruction" appears for a second and the entire
mac locks up after that. Any ideas?
-- Scott
==================================================
| Scott McAlister | mcmac@hubcap.clemson.edu |
| CS Senior | |
| Clemson University | |
| Home address: 390 Boggs Rd. |
| Pickens, SC 29671 |
==================================================
Path: ucivax!gateway
From: mcmac@hubcap.clemson.edu (Scott McAlister)
Subject: How to lock a folder??
Message-ID: <9105201856.AA16016@hubcap.clemson.edu>
X-Mailer: Elm [version 2.1 PL1]
Newsgroups: fa.think-c
Lines: 20
Date: 20 May 91 18:57:39 GMT
I am trying to write a small utility program for our mac labs here at
Clemson. One thing that I would like to do is to be able to write-protect
a folder so that the students can't hide folders within our folders
containing our registered software. Hopefully, using this technique
we won't have to search every folder in order to delete the unregistered
software.
Thanks,
-- Scott
==================================================
| Scott McAlister | mcmac@hubcap.clemson.edu |
| CS Senior | |
| Clemson University | |
| Home address: 390 Boggs Rd. |
| Pickens, SC 29671 |
==================================================
Path: ucivax!gateway
From: mcmac@hubcap.clemson.edu (Scott McAlister)
Subject: Want "Loser" source from Zmac on CompuServe
Message-ID: <9105201900.AA16295@hubcap.clemson.edu>
X-Mailer: Elm [version 2.1 PL1]
Newsgroups: fa.think-c
Lines: 14
Date: 20 May 91 19:01:42 GMT
If anybody has downloaded the "Loser" application source code from
ZMAC, could you forward it to me. This application was mentioned
in the "Power Programming" article of the Sept. '90 MacUser.
-- Scott
==================================================
| Scott McAlister | mcmac@hubcap.clemson.edu |
| CS Senior | |
| Clemson University | |
| Home address: 390 Boggs Rd. |
| Pickens, SC 29671 |
==================================================
Path: ucivax!gateway
From: lister@leland.stanford.edu (Dan Karp)
Subject: TCL: Menus on the fly
Message-ID: <9105201940.AA17444@leland.Stanford.EDU>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 39
Date: 20 May 91 19:41:07 GMT
A small TCL question:
In order to build a menu on the fly, I think I need to make
lots of calls to InsertMenuCmd. This takes as parameters
a command number, a string, a menu id number, and a position
at which the string should be entered into the menu.
From p. 243 of the THINK C User's Manual,
"When you build a menu on the fly like this,
the bartender does not associate a command
number with the menu items. In this case,
the bartender's FindCmdNumber() returns the
negative of the menu ID in the high word and
the item ID in the low word."
That above quote was referring to the resource-based menus (like
the Font menu) added with AddResMenu, so it may not be applicable.
Still, I'd like it so that it returns the negative-of-high-byte-plus-
low-byte-combo for my built-on-the-fly menu, as well. But in
order to insert the commands into the menu, I have to give them
command numbers (as cmdNo is a parameter for InsertMenuCmd).
So do I have to maintain a group of unique command numbers to
associate with my built-on-the-fly menu items? I realize that
it can't be anything as simple as passing -1L as the command
number to InsertMenuCmd, as the only tool for removing a command
from a menu depends only of the command number of the entry to be
removed.
Please help.
Thanks,
Dan
Path: ucivax!gateway
From: LIB_MALAM@vaxc.stevens-tech.edu (Mehboob Alam - Macintosh Specialist)
Subject: folder protection etc.
Message-ID: <5978B46960203860@VAXC.STEVENS-TECH.EDU>
X-VMS-Cc: LIB_MALAM
Newsgroups: fa.think-c
X-VMS-To: IN%"think-c@ics.uci.edu"
Lines: 15
Date: 20 May 91 22:33:44 GMT
Scott,
There are a number of ways to protect a Macintosh in a student lab
environment. But 'write-protecting' a folder is not very easy to with
simple programming. You will need some commercial software to
accomplish that.
Anyways, most of the methods I developed over the years to keep the
Macs safe and happy; well, all of them fail under System 7.0. Mail me
if you want some details.
Mehboob Alam
MD_MALAM@STEVENS
MD_MALAM@SITVAX.STEVENS-TECH.EDU
Path: ucivax!gateway
From: bjb@pdaeng.uucp (Bruce Beare)
Subject: Has anyone modifed TCL for the required apple-events?
Message-ID: <9105201708.AA20522@pyrps5.pyramid.com>
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 10
Date: 21 May 91 06:19:55 GMT
I'm in the throws of updating a TCL application for 7.0. I've been
diligently studying the AppleEvents and Publish/Subscribe documentation.
Before running off and coding this up -- I'd thought I'd check whether anyone
has already worked support for this stuff into TCL? If so, are you
willing to make it public??
Bruce
bjb@pyramid.com
Path: ucivax!gateway
From: jk4i+@andrew.cmu.edu ("John McCall Kingsley, III")
Subject: termination
Message-ID: <kcCbqke00UhB81IGdV@andrew.cmu.edu>
Newsgroups: fa.think-c
Lines: 5
Date: 22 May 91 14:20:21 GMT
please remove me from the mailing list as soon as possible.
Jack Kingsley
Path: ucivax!gateway
From: iron@imag.fr (Francois Menneteau)
Subject: What is the procedure to belong to the think-c mailing list ?
Message-ID: <9105241415.AA03467@imag.imag.fr>
Newsgroups: fa.think-c
Lines: 7
Date: 24 May 91 13:50:30 GMT
X-Organization: IMAG Institute, University of Grenoble
I purchased Think-c 4 in France.
--
Francois Menneteau () __|||||__ () "... I had their lives in my hands
================== () /O O\ () their fate their fortune in my visions
iron@imag.fr () - .|. - () No one believed in my true prophecy
================== () \=^=/ () And now it's too late." (Iron Maiden)
Path: ucivax!gateway
From: hanche@imf.unit.no (Harald Hanche-Olsen)
Subject: What is the procedure to belong to the think-c mailing list ?
Message-ID: <9856.9105241521@hufsa.imf.unit.no>
In-Reply-To: Francois Menneteau's message of 24 May 91 13:50:30 GMT <9105241415.AA03467@imag.imag.fr>
Newsgroups: fa.think-c
Lines: 9
Date: 24 May 91 15:23:18 GMT
Write to think-c-request@ics.uci.edu
The same procedure applies to most mailing lists: Append -request to
the list name.
- Harald Hanche-Olsen <hanche@imf.unit.no>
Division of Mathematical Sciences
The Norwegian Institute of Technology
N-7034 Trondheim, NORWAY
Path: ucivax!gateway
From: iron@imag.fr (Francois Menneteau)
Subject: Re: What is the procedure to belong to the think-c mailing list ?
Message-ID: <9105241621.AA08243@imag.imag.fr>
In-Reply-To: Harald Hanche-Olsen <hanche@imf.unit.no>
"What is the procedure to belong to the think-c mailing list ?" (May 24, 17:21)
Newsgroups: fa.think-c
Lines: 18
Date: 24 May 91 15:57:25 GMT
X-Organization: IMAG Institute, University of Grenoble
Dans votre courrier du 24 May vous ecrivez :
>Write to think-c-request@ics.uci.edu
>
>The same procedure applies to most mailing lists: Append -request to
>the list name.
>
>- Harald Hanche-Olsen <hanche@imf.unit.no>
> Division of Mathematical Sciences
> The Norwegian Institute of Technology
> N-7034 Trondheim, NORWAY
Thanks.
--
Francois Menneteau () __|||||__ () "... I had their lives in my hands
================== () /O O\ () their fate their fortune in my visions
iron@imag.fr () - .|. - () No one believed in my true prophecy
================== () \=^=/ () And now it's too late." (Iron Maiden)
Path: ucivax!gateway
From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
Subject: TMON Pro and THINK C
Message-ID: <9105251515.AA10485@neutron.LCS.MIT.EDU>
Newsgroups: fa.think-c
Lines: 13
Date: 25 May 91 21:25:52 GMT
Has anyone else had any luck getting the new version of TMON Pro to
work under THINK C the way the old version did? The command-M key in
the THINK C Debugger to drop into the monitor doesn't seem to work,
and in fact seems to cause great confusion to the system, ultimately
requiring a reboot. (Using a Debugger() trap in the program, and
turning off THINK's debugger, seems to work OK, though.)
Other than that, I like TMON Pro so far (except that it's a tremendous
memory hog: upwards of 750K in any reasonable configuration). Looks
like you could get it to make coffee for you...
-- Russell S. Finn
rsfinn@lcs.mit.edu
Path: ucivax!gateway
From: bradk@wimsey.bc.ca (Brad Kollmyer)
Subject: Re: TMON Pro and THINK C
Message-ID: <m0jhXFt-0000RPC@wimsey.bc.ca>
In-Reply-To: <9105251515.AA10485@neutron.LCS.MIT.EDU>; from "Russell S. Finn" at May 25, 91 9:25 pm
X-Mailer: ELM [version 2.3 PL11]
Newsgroups: fa.think-c
Lines: 12
Date: 27 May 91 02:21:43 GMT
> Has anyone else had any luck getting the new version of TMON Pro to
> work under THINK C the way the old version did? The command-M key in
> the THINK C Debugger to drop into the monitor doesn't seem to work,
> and in fact seems to cause great confusion to the system, ultimately
> requiring a reboot. (Using a Debugger() trap in the program, and
> turning off THINK's debugger, seems to work OK, though.)
Try having a assembley window set to (pc-4). This will be the current
instruction the program is at.
Brad Kollmyer
bradk@wimsey.bc.ca
Path: ucivax!gateway
From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
Subject: Re: TMON Pro and THINK C
Message-ID: <9105271711.AA12775@neutron.LCS.MIT.EDU>
In-Reply-To: Your message of Sun, 26 May 91 19:24:20 -0700.
<m0jhXFt-0000RPC@wimsey.bc.ca>
Newsgroups: fa.think-c
Lines: 27
Date: 27 May 91 17:11:45 GMT
> Try having a assembley window set to (pc-4). This will be the current
> instruction the program is at.
Thanks for your response; unfortunately, I don't think you read my
message very closely. Let me restate the problem:
I'm experiencing problems with the newest version of TMON, called TMON
Professional (or TMON 3.0); I can't use the Monitor (command-M)
command in the THINK C Debugger to enter the low-level debugger, as
with previous versions of TMON. When I hit command-M, TMON is not
entered; in fact, nothing appears to happen immediately. However,
subsequently I have problems entering TMON directly (using the
Programmer's Key INIT), and I usually end up having to reboot.
(Although this is beside the point, the suggestion won't work
correctly under TMON 3.0; the new syntax for anchoring a window to
that location would be <option-J>PC-4, where option-J produces the
capital Delta symbol.)
I imagine that the rumored THINK C 5.0 will address this issue; in the
meantime, has anyone figured out another workaround (besides using
_Debugger traps in the program under development, and turning off the
THINK C Debugger)?
-- Russell S. Finn
rsfinn@lcs.mit.edu
Path: ucivax!gateway
From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
Subject: TMON Pro and THINK C
Message-ID: <9105280037.AA24817@chaos.cs.brandeis.edu>
In-Reply-To: "Russell S. Finn"'s message of 27 May 91 17:11:45 GMT <9105271711.AA12775@neutron.LCS.MIT.EDU>
Newsgroups: fa.think-c
Lines: 29
Date: 28 May 91 00:37:31 GMT
From: "Russell S. Finn" <rsfinn@neutron.lcs.mit.edu>
I'm experiencing problems with the newest version of TMON, called
TMON Professional (or TMON 3.0); I can't use the Monitor
(command-M) command in the THINK C Debugger to enter the low-level
debugger, as with previous versions of TMON. When I hit command-M,
TMON is not entered; in fact, nothing appears to happen
immediately. However, subsequently I have problems entering TMON
directly (using the Programmer's Key INIT), and I usually end up
having to reboot.
I can't tell you of any workaround, but I can tell you why you're
having this problem with Think C and TMON Pro.
When you use Command-M (Monitor) from Think C, it checks to see what
kind of debugger you have installed. If you have TMON installed, it
will place your application's PC into TMON's V register, and the value
of the selection in the data window, if any, into TMON's N register.
Think C v4.0 can't tell the difference between old TMON and TMON Pro,
and TMON Pro stores these registers at a different location than TMON
did. Thus, using the Monitor command causes TMON Pro to become
trashed, since Think C writes to the contents of TMON.
-phil
----
Phil Shapiro Technical Support Analyst
Language Products Group Symantec Corporation
Internet: phils@chaos.cs.brandeis.edu
Path: ucivax!gateway
From: rsfinn@neutron.lcs.mit.edu ("Russell S. Finn")
Subject: Re: TMON Pro and THINK C
Message-ID: <9105280525.AA13485@neutron.LCS.MIT.EDU>
In-Reply-To: Your message of Mon, 27 May 91 20:37:09 -0400.
<9105280037.AA24817@chaos.cs.brandeis.edu>
Newsgroups: fa.think-c
Lines: 17
Date: 28 May 91 05:26:09 GMT
> Think C v4.0 can't tell the difference between old TMON and TMON Pro,
> and TMON Pro stores these registers at a different location than TMON
> did. Thus, using the Monitor command causes TMON Pro to become
> trashed, since Think C writes to the contents of TMON.
So basically I'm hosed until the semi-mythical THINK C 5.0 becomes a
reality, eh? I kind of figured that. (Looking for beta testers?)
I suppose it would be really cool if 5.0 used the "monitor action
verbs" to communicate directly with TMON Pro (for lurkers, TMON
registers itself with Gestalt, and informed programs can use Gestalt
to get a procedure pointer through which it can call TMON directly to
get it to do things), wouldn't it?
Thanks for your help.
-- Russ
Path: ucivax!gateway
From: iron@imag.fr (Francois Menneteau)
Subject: Freqently asked questions
Message-ID: <9105291030.AA06021@imag.imag.fr>
Newsgroups: fa.think-c
Lines: 22
Date: 29 May 91 10:29:36 GMT
X-Organization: IMAG Institute, University of Grenoble
As I am new in this mailing list, I don't want to query for responses that
have been already discussed in the past.
However, I don't know how to get the list of topics alrealdy treated (there
is not in the mac/think-c/archives directory a list of these subjets, and I
don't want to download all the files [until I have no other choices]).
open bracket
So if the subject is new, the question is :
How to get info about the think-c classes that are not described in the
manual (BitMap stuff, etc) ?
If it is not, in which archive I can found the answer ?
close bracket.
Thanks a lot.
--
Francois Menneteau () __|||||__ () "... I had their lives in my hands
================== () /O O\ () their fate their fortune in my visions
iron@imag.fr () - .|. - () No one believed in my true prophecy
================== () \=^=/ () And now it's too late." (Iron Maiden)
Path: ucivax!gateway
From: STEFAN_S@gemini.ldc.lu.se (Stefan Strand)
Subject: SFPGetFile
Message-ID: <6A77B67B521F003D48@gemini.ldc.lu.se>
Newsgroups: fa.think-c
X-Vms-To: IN%"think-c@ics.uci.edu"
Lines: 33
Date: 29 May 91 19:58:46 GMT
Hi!
We are having a small problem with the following code:
FlushEvents(everyEvent, 0);
SFPGetFile(corner, NULL, NULL, -1, NULL,
SFGetHook2, &macSFReply, DLOGgetFile, NULL);
FlushEvents(everyEvent, 0);
SFPGetFile(corner, NULL, NULL, -1, NULL,
SFGetHook2, &macSFReply, DLOGgetFile, NULL);
pascal short SFGetHook2(short MySFItem, DialogPtr theDialog)
{
switch (MySFItem) {
case firstTime:
return reDrawList;
case idleItem:
while (Button())
SysBeep(20);
}
return MySFItem;
};
The first time that we call SFPGetFile everything works correctly, but the
The first time that we call SFPGetFile everything works correctly, but the
second call doesn't seem to send any idleItem to the SFGetHook2 function!
Would appreciate any suggestions and solutions to this little problem.
We are running System 6.0.5 on a Mac IIfx with no INIT or CDEVs, Think C version
4.0.5, and Multifinder.
Many thanks, Stefan Strand, Lund Institute of Technology, Sweden
Email: e85ss@efd.lth.se
stefan_s@gemini.ldc.lu.se